<?php
namespace app\common\system\validate;

use app\common\system\logic\FormLogic;
use think\Validate;

class DepartmentValidate extends Validate
{
    protected $rule = [
        'id'    => 'require|gt:0',
        'title' => 'require'
    ];

    protected $message = [
        'id.require' => '参数错误',
        'id.gt' => '参数错误',
        'title.require' => '部门名称不能为空'
    ];

    protected $scene = [
        'create'    => ['title'],
        'edit'      => ['id', 'title'],
    ];
}